#!/bin/sh

CLASSDIR=classes

rm -Rf $CLASSDIR everything.jar
mkdir -p $CLASSDIR

javac -sourcepath src1:src2:src3 -d classes src3/ca/uoit/csci2020u/executables/TestAll.java

# The 'm' option tells 'jar' to include a manifest file (named MANIFEST.MF in our case).  Manifest files give additional information to Java when it tries to use the JAR.  In our case, we only specified the main class to execute.  It also makes running easier:
#  java -jar everything.jar
#              VS
#  java -cp everything.jar ca.uoit.csci2020u.executables.TestAll
jar cmf MANIFEST.MF everything.jar -C $CLASSDIR/ .
